/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package tk.zater;


import org.apache.log4j.Logger;

import tk.zater.CS.EsetVersionConfigeration;

/**
 *
 * @author Administrator
 */
public class controlThread implements Runnable {
private	EsetVersionConfigeration ex;
Logger logger=Logger.getLogger(controlThread.class);
public  controlThread(EsetVersionConfigeration ex) {
	// TODO Auto-generated constructor stub
	this.ex=ex;
	
}
    @Override
    public void run() {
        while (true) {
        	 logger.info(ex.getVersionName()+"休息计数器开始计数");
            Thread thread2 = new Thread(new download(ex));
            thread2.start();
            try {
                Thread.sleep(ex.updateInterval);
            } catch (InterruptedException ex) {
         logger.error(ex.getStackTrace());
            }
            logger.info(
            		ex.getVersionName()+ "休息结束");
        }
    }
   
}
